﻿@model ShivamEMR.Model.Domain.CRMDomain.Appointment

@{
    ViewBag.Title = "New";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h1>Edit Appointment</h1>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>


@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
<div class='metro-pivot'>
<div class='pivot-item'>
    @* <h3>Section 1</h3> *@
        <table width="100%" cellpadding="4" cellspacing="4">
		<tr>
<td>
@Html.HiddenFor(model => model.ID)
        <div class="editor-label">
            @Html.LabelFor(model => model.DateAndTime)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.DateAndTime)
            @Html.ValidationMessageFor(model => model.DateAndTime)
        </div>
</td>
    </tr><tr>
	<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.Occation)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.Occation)
            @Html.ValidationMessageFor(model => model.Occation)
        </div>
</td>
</tr>

<tr>

<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.Priority)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.Priority)
            @Html.ValidationMessageFor(model => model.Priority)
        </div>
</td>
    </tr>
    
    <tr>

<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.Employee)
        </div>
</td>
<td>

        <div class="editor-field">
    @Html.DropDownListFor(model => model.EmployeeID, ((IEnumerable<ShivamEMR.Model.Domain.CompanyDomain.Employee>)ViewBag.PossibleEmployees).Select(option => new SelectListItem
{
    Text = (option == null ? "None" : option.FullName),
    Value = option.ID.ToString(),
    Selected = (Model != null) && (option.ID == Model.EmployeeID)
}), "Choose...")
    @Html.ValidationMessageFor(model => model.EmployeeID)
</div>
</td>
    </tr><tr>
	@*<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.AppointmentGroupID)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.AppointmentGroupID)
            @Html.ValidationMessageFor(model => model.AppointmentGroupID)
        </div>
</td>*@
<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.Venue)
        </div>
</td>
<td>

        <div class="editor-field">
    @Html.DropDownListFor(model => model.VenueID, ((IEnumerable<ShivamEMR.Model.Domain.CRMDomain.Venue>)ViewBag.PossibleVenues).Select(option => new SelectListItem
{
    Text = Html.DisplayTextFor(_ => option.Title).ToString(),
    Value = option.ID.ToString(),
    Selected = (Model != null) && (option.ID == Model.VenueID)
}), "Choose...")
    @Html.ValidationMessageFor(model => model.VenueID)
</div>
</td>
    </tr><tr>

    <tr>
    
    	<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.Notes)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.Notes)
            @Html.ValidationMessageFor(model => model.Notes)
        </div>
</td>
    
    </tr>
	@*<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.AppointmentStatusID)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.AppointmentStatusID)
            @Html.ValidationMessageFor(model => model.AppointmentStatusID)
        </div>
</td>*@
     </tr></table></div>     
   </div>
        <p>
            <input type="submit" value="Save" />
        </p>
    
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
<script>
$(function () {
    $("div.metro-pivot").metroPivot();
});
</script>
